package com.ruoyi.project.order.service;

import com.ruoyi.common.utils.security.ShiroUtils;
import com.ruoyi.project.order.domain.Order;
import com.ruoyi.project.order.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderEditServiceImpl implements IOrderEditService{
    @Autowired
    private OrderMapper orderMapper;
    @Override
    public Order selectOrderByOrderId(Long id) {
        return orderMapper.selectOrderByOrderId(id);
    }

    @Override
    public int editOrder(Order order) {
        //设置更新者
        order.setUpdate_by(ShiroUtils.getLoginName());
        return orderMapper.updateOrder(order);
    }
}
